﻿using Microsoft.EntityFrameworkCore;
using TodoList.EFCore.Entities;

namespace TodoList.EFCore
{
    public class TodoDbContext:DbContext
    {
        public TodoDbContext(DbContextOptions<TodoDbContext> options) : base(options)
        {

        }

        public DbSet<Todo> Todoes { get; set; }

        
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            //var entity = modelBuilder.Entity<Todo>();

            //entity.ToTable("todo");

            //entity.Property(x => x.Content) 
            //    .HasMaxLength(500)
            //    .HasComment("content");
        }
    }
}
